package server

import (
	"strconv"
	"zk1/common/models"
	"zk1/common/proto/taxi"
)

func Update(in *taxi.UpdateRequest) (*taxi.UpdateResponse, error) {
	update, err := models.Update(in.Destination)
	if err != nil {
		return nil, err
	}
	return &taxi.UpdateResponse{TaxiId: strconv.Itoa(int(update.ID))}, nil
}
